<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
	  xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<body class="gray-bg" id="test">
<div class="wrapper wrapper-content">
	<div class="col-sm-12">
		<div class="row">
			<div class="row">
				<div class="col-sm-12">
					<div class="ibox float-e-margins">
						<div class="ibox-title">
							<h5>订单详情</h5>
							<div class="ibox-tools">
								<a class="collapse-link">
									<i class="fa fa-chevron-up"></i>
								</a>
								<a class="close-link">
									<i class="fa fa-times"></i>
								</a>
							</div>
						</div>
						<div class="ibox-content">
							<input type="hidden" th:value="${paymentOrder.orderStatus}" name="orderStatus" id="orderStatus">
							<input type="hidden" th:value="${paymentOrder.clearingStatus}" name="clearingStatus" id="clearingStatus">
							<input type="hidden" th:value="${paymentOrder.orderType}" name="orderType" id="orderType">

							<div class="row">
								<div class="col-sm-12">
									<table class="table table-hover margin bottom">
										<tbody>
										<tr >
											<td >订单ID:</td>
											<td th:text="${paymentOrder.id}"></td>
											<td >订单编号:</td>
											<td th:text="${paymentOrder.orderNo}"></td>
										</tr>
										<tr >
											<td >商户id:</td>
											<td th:text="${paymentOrder.merchantId}"> </td>
											<td >商户名称:</td>
											<td th:text="${paymentOrder.merchantName}"></td>
										</tr>
										<tr >
											<td >订单类型:</td>
											<td id="orderTypeView"></td>
											<td >订单状态:</td>
											<td id="orderStatusView"></td>
										</tr>
										<tr >
											<td >通道ID:</td>
											<td th:text="${paymentOrder.acqId}"></td>
											<td >通道编号:</td>
											<td th:text="${paymentOrder.acqCode}"></td>

										</tr>
										<tr>
											<td >通道名称:</td>
											<td th:text="${paymentOrder.acqName}"></td>
										</tr>

										<tr >
											<td>消费信用卡号:</td>
											<td th:text="${paymentOrder.creditNumber}"></td>
											<td>银行名称:</td>
											<td th:text="${paymentOrder.bankName}"></td>
										</tr>
										<tr >
											<td >金额:</td>
											<td style="color: red" th:text="${paymentOrder.amountMoney}"></td>
											<td >清分状态:</td>
											<td id="clearingStatusView"></td>
										</tr>

										<tr >
											<td >通道返回的状态码:</td>
											<td th:text="${paymentOrder.acqReturnCode}"></td>
											<td >通道返回的请求描述:</td>
											<td th:text="${paymentOrder.acqReturnMsg}"></td>
										</tr>

										<tr >
											<td >订单创建时间:</td>

											<td  th:text="${#dates.format(paymentOrder.createTime,'yyyy-MM-dd HH:mm:ss')}"></td>
											<td>订单完成时间</td>
											<td th:text="${#dates.format(paymentOrder.completeTime,'yyyy-MM-dd HH:mm:ss')}"></td>
										</tr>
										<tr>
											<td >收益:</td>
											<td th:text="${paymentOrder.profitMoney}"></td>
										</tr>
										</tbody>
									</table>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>
</body>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
	var orderStatus = [[${@dict.getType('sys_new_order_status')}]];
	var clearingStatus = [[${@dict.getType('sys_new_order_clearing')}]];
	var orderType = [[${@dict.getType('sys_new_order_type')}]];
	$(function() {
		$("#orderStatusView").append( $.table.selectDictLabel(orderStatus, $("#orderStatus").val()))
		$("#clearingStatusView").append( $.table.selectDictLabel(clearingStatus, $("#clearingStatus").val()))
		$("#orderTypeView").append( $.table.selectDictLabel(orderType, $("#orderType").val()))
	})



	$(".modal").appendTo("body"), $("[data-toggle=popover]").popover(), $(".collapse-link").click(function() {
		var div_ibox = $(this).closest("div.ibox"),
				e = $(this).find("i"),
				i = div_ibox.find("div.ibox-content");
		i.slideToggle(200),
				e.toggleClass("fa-chevron-up").toggleClass("fa-chevron-down"),
				div_ibox.toggleClass("").toggleClass("border-bottom"),
				setTimeout(function() {
					div_ibox.resize();
				}, 50);
	}), $(".close-link").click(function () {
		var div_ibox = $(this).closest("div.ibox");
		div_ibox.remove()
	});
</script>
</html>
